package com.entity;

import com.ymx.darling.bean.annotation.Entity;
import com.ymx.darling.bean.annotation.Id;
import com.ymx.darling.executor.mapping.relation.annotation.RelationOneToMany;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

import java.io.Serializable;
import java.util.List;

/**
 * @author 爱Java的小于
 */
@Data
@Entity(table = "menu")
public class Menu {
	@Id
	private int menuId;
	private String menuName;
	private int parentMenuId;
	// 子菜单列表
	@RelationOneToMany(targetField = "parentMenuId")
	private List<Menu> menuList; // 2 3
}
